home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagn_r.zip / NUMBERS.SWG / 0003_BIT_GET.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  227b  |  11 lines

  1. { You can use multiplies of 2 like: }
  2.  
  3. Function Find_Bit(B, c : Byte) : Byte;
  4. {c is the position c=0 far right c=7 far left
  5. returns 0 or 1}
  6. begin
  7.  if b MOD (b shl c) = 0 then Find_Bit := 0
  8.   else Find_Bit := 1
  9. end;
  10.  
  11.